<fieldset style="height: 67px; margin-top: -10px">
    <legend>条件搜索</legend>

    <form class="layui-form layui-form-pane form-search" action="{:url('')}" onsubmit="return false" method="get"
          autocomplete="off" style="float: left; ">
        <div class="layui-form-item layui-inline" style="z-index: 10">
            <label class="layui-form-label">商品ID</label>
            <label class="layui-input-inline">
                <input name="product_id" value="{:input('product_id','')}" placeholder="请输入商品ID" class="layui-input">
            </label>
        </div>
        <div class="layui-form-item layui-inline" style="z-index: 10">
            <label class="layui-form-label">状态</label>
            <label class="layui-input-inline">
                <select class="layui-select" name="status">
                    {foreach [''=>'- 全部 -', '1'=>'有效','2'=>'无效']
                    as $k=>$v}
                    {if input('status') eq $k.''}
                    <option selected value="{$k}">{$v}</option>
                    {else}
                    <option value="{$k}">{$v}</option>
                    {/if}
                    {/foreach}
                </select>
            </label>
        </div>
        <div class="layui-form-item layui-inline" style="z-index: 10">
            <button class="layui-btn layui-btn-primary"><i class="layui-icon">&#xe615;</i> 搜 索</button>
         <!--   <button class="layui-btn layui-btn-sm" onclick="downloadFile()">导 出</button>-->
        </div>
    </form>

    <script>form.render()</script>
</fieldset>

<script>
    function downloadFile() {
        // 创建一个隐藏的表单
        var form = $('<form></form>');
        form.attr('method', 'POST');
        form.attr('action', '/airobot/forge/export.html?spm=m-25-91-92'); // PHP 文件路径

        // 将表单添加到 body 中并提交
        $('body').append(form);
        form.submit();
        form.remove(); // 提交后移除表单
    }
</script>
